package com.swak.frame.hystrix.spring.configuration;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import com.swak.frame.hystrix.SwakHystrixCommandAspect;

/**
 * 服务熔断机制
 * ClassName: SwakHystrixAutoConfiguration.java 
 * @author colley.ma
 * @date 2021年3月19日 下午3:59:55
 */
@Configuration
@EnableAspectJAutoProxy
public class SwakHystrixAutoConfiguration {

	@Bean
	@ConditionalOnMissingBean(SwakHystrixCommandAspect.class)
	public SwakHystrixCommandAspect initMarsHystrixAspect() {
		return new SwakHystrixCommandAspect();
	}
}
